<?php 
header("Content-type: text/html; charset=utf-8");
//身份证正则
$str='100025208905095646';

$preg="/^[1-9][0-9]{5}(1[9]|2[0])[0-9]{2}(1[012]|0[1-9])([012][0-9]|3[01])[0-9]{3}([0-9]|X)$/";

 $c=preg_match($preg , $str);
 var_dump($c);


	//采购   
	$num=['jjj'=>[],'bbb'=>[],'ooo'=>[]];
		
	$arr=file_get_contents("https://www.lagou.com/");
	$arr = mb_convert_encoding($arr, 'UTF-8','UTF-8,GBK,GB2312,BIG5');
	$pregg="/<a href=\".*?\" target=\"_blank\" class=\"position_link fl wordCut\" data-index=\".*?\" data-lg-tj-id=\".*?\" data-lg-tj-no=\".*?\" data-lg-tj-cid=\".*?\">(.*?)<span>(.*?)<\/span><\/a>.*?<span class=\"salary fl\">(.*?)<\/span>/s";
	$dd=preg_match_all($pregg, $arr, $out);
	$num['jjj']=array_merge($num['jjj'],$out[1]);
	$num['bbb']=array_merge($num['bbb'],$out[2]);
	$num['ooo']=array_merge($num['ooo'],$out[3]);
	
	var_dump($num);
	$num = json_encode($num,true);
	
	file_put_contents("./db.txt",$num);


    

// $cc=$out;
// var_dump($cc);
// var_dump($dd);












 ?>